<template>
  <div class="person-body">
    <van-nav-bar
      left-arrow
      left-text="返回"
      :title="title"
      @click-left="handleBack"
    />
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  mounted () {
    console.log('person mounted');
    const auth = this.$store.getters.isAuth;
    if(!auth) {
      this.$router.push({name: 'selectLocation'})
    }
  },
  methods: {
    handleBack() {
      this.$router.go(-1)
    },
  },
  data() {
    return {
      title: '实名认证',
    }
  },
};
</script>

<style lang="scss" scoped>
.person-body {
  display: flex;
  flex-direction: column;
}
</style>